package com.cdvtc.flower.model;

import java.math.BigDecimal;
import java.sql.Date;

public  class Orderdetail {
    private int order_detail_id;
    private int order_id;
    private int quantity;
    private int product_id;;
    private int customer_id;
    private Date order_date_time;
    private Products products;

    private String review;
    private BigDecimal sale_price;

    public Products getProduct() {
        return products;
    }

    public void setProduct(Products products) {
        this.products = products;
    }

    public int getProduct_id() {
        return product_id;
    }

    public void setProduct_id(int product_id) {
        this.product_id = product_id;
    }

    public int getOrder_id() {
        return order_id;
    }

    public void setOrder_id(int order_id) {
        this.order_id = order_id;
    }

    public int getOrder_detail_id() {
        return order_detail_id;
    }

    public void setOrder_detail_id(int order_detail_id) {
        this.order_detail_id = order_detail_id;
    }

    public int getQuantity() {
        return quantity;
    }

    public void setQuantity(int quantity) {
        this.quantity = quantity;
    }
    public int getCustomer_id() {
        return customer_id;
    }

    public void setCustomer_id(int customer_id) {
        this.customer_id = customer_id;
    }

    public Date getOrder_date_time() {
        return order_date_time;
    }

    public void setOrder_date_time(Date order_date_time) {
        this.order_date_time = order_date_time;
    }

    public BigDecimal getTotal_price() {
        return this.sale_price.multiply(BigDecimal.valueOf(quantity));
    }


    public String getReview() {
        return review;
    }

    public void setReview(String review) {
        this.review = review;
    }

    public BigDecimal getSale_price() {
        return sale_price;
    }

    public void setSale_price(BigDecimal sale_price) {
        this.sale_price = sale_price;
    }
    @Override
    public String toString() {
        return "Orderdetail{" +
                "order_detail_id=" + order_detail_id +
                "order_id=" + order_id +
                "quantity=" + quantity +
                "product_id=" + product_id +
                "customer_id=" + customer_id +
                " order_date_time=" + order_date_time +
                "sale_price=" + sale_price +
                "review=" + review +
                '}';
    }

}